<template>
	<MyPage title="条款与规则" :isback="true">
		<view slot="gBody"> 
			<view class="my-content">
				<u-cell-group class="list-group">
					<u-cell-item
						v-for="(item, index) in list"
						:key="index"
						:title="item.title"
						@click="$utils.navigateTo('/agreement/agreement',{id:item.id})"
					></u-cell-item>
				</u-cell-group>
			</view>
		</view>
	</MyPage>
</template>

<script>
import { agreementList } from '@/api/agreement.js'
export default {
	data() {
		return { 
			list:[]
		}
	},
	onLoad() {
		this.getList();
	}, 
	methods: {
		// 获取列表
		getList(){
			agreementList().then(res=>{
				this.list = res.list;
			}).catch(err=>{
				uni.showToast({
					title: err.msg,
					icon:'none'
				})
			});
		}
	}
}
</script>

<style lang="scss" scoped>
.list-group{
	/deep/ .u-border-top:after{
		border-top:none;
	}
	/deep/ .u-cell{
		padding-left:0;
		padding-right:0;
		.u-cell_title{
			font-size:32rpx;
			color: #333;
		}
	}
}
</style>